/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package dao.inventory;

import dao.BaseDaoHibernate;
import java.util.List;
import model.inventory.Dept;
import org.springframework.stereotype.Repository;

/**
 *
 * @author Lalugina
 */
@Repository
public class DeptDao extends BaseDaoHibernate<Dept>{
    
    public List<Dept> getDeptTree(int induk) {
        return sessionFactory.getCurrentSession()
               .createQuery("from Dept d where d.induk = "+induk)
               .list();
    }

}